package com.rock.common.base;

import java.util.HashMap;
import java.util.Map;

public class BaseQuery {
	/*
	 * 页号
	 */
	private int pageNum;
	/*
	 * 每页记录数
	 */
	private int pageSize;
	/*
	 * 是否分页
	 */
	private boolean isPagination = true;
	/*
	 * 扩展信息，查询条件<k,v>键值对
	 */
	private Map<String, Object> extend = new HashMap<String, Object>();
	
	public BaseQuery(){
		
	}
	public BaseQuery(int pageNum,int pageSize,boolean isPagination){
		this.pageNum=pageNum;
		this.pageSize=pageSize;
		this.isPagination=isPagination;		
	}
	

	public BaseQuery add(String key, Object value) {
		this.getExtend().put(key, value);
		return this;
	}

	public Map<String, Object> getExtend() {
		return extend;
	}

	public void setExtend(Map<String, Object> extend) {
		this.extend = extend;
	}

	public int getPageNum() {
		return pageNum;
	}

	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}


	public boolean getIsPagination() {
		return isPagination;
	}
	public void setIsPagination(boolean isPagination) {
		this.isPagination = isPagination;
	}

}
